/*********************************************************
 *  Copyright (c) 2011 by Web Information Systems (WIS) Group, 
 *  Delft University of Technology.
 *  Qi Gao, http://wis.ewi.tudelft.nl/index.php/home-qi-gao
 *  
 *  Some rights reserved.
 *
 *  Contact: q.gao@tudelft.nl
 *
 **********************************************************/
package org.persweb.genius.example;

import org.persweb.genius.GenericModelingStrategy;
import org.persweb.genius.GeniusConfiguration;
import org.persweb.genius.data.ItemsFetcher;
import org.persweb.genius.data.SimpleItemsFetcherFromFile;
import org.persweb.genius.enrichment.Enrichment;
import org.persweb.genius.enrichment.SpotlightEnrich;
import org.persweb.genius.model.Profile;
import org.persweb.genius.util.ProfileUtil;
import org.persweb.genius.weight.TF;
import org.persweb.genius.weight.WeightFunction;

/**
 * @author Qi Gao <a href="mailto:q.gao@tudelft.nl">q.gao@tudelft.nl</a>
 * @version created on Oct 25, 2011 3:30:46 PM
 */
public class SimpleModelingExample {

	public static void main(String args[]) {

		debugGeniusSimple();
	}


	/**
	 * a simple test
	 */
	public static void debugGeniusSimple() {

		long start = System.currentTimeMillis();

		WeightFunction weightScheme = new TF();
		Enrichment enrichment = new SpotlightEnrich();

		ItemsFetcher itemsFetcher = new SimpleItemsFetcherFromFile();

		GeniusConfiguration gConf = new GeniusConfiguration(
				"genius-test-simple", itemsFetcher, enrichment, weightScheme);

		GenericModelingStrategy modelingStrat = new GenericModelingStrategy(
				gConf);

		Profile profile = modelingStrat.getProfile(gConf, null);

		ProfileUtil.printInterestProfile(profile);
		System.out.println("Time for processing: "
				+ (System.currentTimeMillis() - start));
	}

}
